package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.JifenUserPointsAccountMapper;
import com.ruoyi.system.domain.JifenUserPointsAccount;
import com.ruoyi.system.service.IJifenUserPointsAccountService;
import com.ruoyi.common.core.text.Convert;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-14
 */
@Service
public class JifenUserPointsAccountServiceImpl implements IJifenUserPointsAccountService 
{
    @Autowired
    private JifenUserPointsAccountMapper jifenUserPointsAccountMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param accountId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public JifenUserPointsAccount selectJifenUserPointsAccountByAccountId(Long accountId)
    {
        return jifenUserPointsAccountMapper.selectJifenUserPointsAccountByAccountId(accountId);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param jifenUserPointsAccount 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<JifenUserPointsAccount> selectJifenUserPointsAccountList(JifenUserPointsAccount jifenUserPointsAccount)
    {
        return jifenUserPointsAccountMapper.selectJifenUserPointsAccountList(jifenUserPointsAccount);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param jifenUserPointsAccount 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertJifenUserPointsAccount(JifenUserPointsAccount jifenUserPointsAccount)
    {
        return jifenUserPointsAccountMapper.insertJifenUserPointsAccount(jifenUserPointsAccount);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param jifenUserPointsAccount 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateJifenUserPointsAccount(JifenUserPointsAccount jifenUserPointsAccount)
    {
        return jifenUserPointsAccountMapper.updateJifenUserPointsAccount(jifenUserPointsAccount);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param accountIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteJifenUserPointsAccountByAccountIds(String accountIds)
    {
        return jifenUserPointsAccountMapper.deleteJifenUserPointsAccountByAccountIds(Convert.toStrArray(accountIds));
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param accountId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteJifenUserPointsAccountByAccountId(Long accountId)
    {
        return jifenUserPointsAccountMapper.deleteJifenUserPointsAccountByAccountId(accountId);
    }

    @Override
    public void addAvailablePoints(String userId, int points) {
        jifenUserPointsAccountMapper.addAvailablePoints(userId, points);
    }
}
